package learn.factorymethod.now;


/**
 * 抽象工厂
 * @author 执笔
 * @date 2019/11/25 16:11
 */
public interface OrderPayFactory {

    /**
     * 得到支付渠道
     * @return
     */
    OrderPay getOrderPay();
}

/**
 * 具体工厂
 */
class WxOrderPayFactory implements OrderPayFactory{

    public OrderPay getOrderPay() {
        return new WxOrderPay();
    }
}

/**
 * 具体工厂
 */
class ZfbOrderPayFactory implements OrderPayFactory{

    public OrderPay getOrderPay() {
        return new ZfbOrderPay();
    }
}

/**
 * 具体工厂
 */
class YlOrderPayFactory implements OrderPayFactory{

    public OrderPay getOrderPay() {
        return new YlOrderPay();
    }
}
